//
//  MCMusicTableCell.swift
//  MCBodyBuildingPro
//
//  Created by Renlvshijie on 2023/5/31.
//

import UIKit
import QMUIKit

class MCMusicTableCell: UITableViewCell {

    @IBOutlet weak var labelContainerLayoutView: QMUIFloatLayoutView!
    
    @IBOutlet weak var actionButton: UIButton!
    @IBOutlet weak var whiteBgView: UIView!
    @IBOutlet weak var titleLabel: UILabel!
    @IBOutlet weak var headerImageView: UIImageView!
    override func awakeFromNib() {
        super.awakeFromNib()
        self.selectionStyle = .none
        
        let labelPaddingLabel = MCPaddingLabel.init()
        
        labelPaddingLabel.text = "舒缓"
        self.labelContainerLayoutView.addSubview(labelPaddingLabel)
        
        let labelPaddingLabel1 = MCPaddingLabel.init()
        
        labelPaddingLabel1.text = "舒缓2"
        self.labelContainerLayoutView.addSubview(labelPaddingLabel1)
        
        whiteBgView.layer.cornerRadius = 6
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        if selected {
            whiteBgView.layer.borderWidth = 1
            whiteBgView.layer.borderColor = UIColor.pg_color(withHexString: "35DE94").cgColor
            actionButton.setImage(UIImage(named: "music_play_back_image"), for: .normal)
        } else {
            whiteBgView.layer.borderWidth = 0
            whiteBgView.layer.borderColor = UIColor.white.cgColor
            actionButton.setImage(UIImage(named: "music_pause_black_image"), for: .normal)
        }
        
    }
    
}
